<html>
<head><meta charset="utf-8"><title>Broaden charter? · project-ffi-unwind · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/index.html">project-ffi-unwind</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html">Broaden charter?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211384546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211384546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211384546">(Sep 26 2020 at 22:02)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span> </p>
<p>Would it be appropriate to broaden our charter now that we are considering <code>longjmp</code> et al.?</p>
<p>Here's our current mission statement:</p>
<blockquote>
<p>To extend the language to support unwinding that crosses FFI boundaries.</p>
</blockquote>
<p>I think this should be broadened to:</p>
<blockquote>
<p>To extend the language to support control-flow constructs that cross between language boundaries without causing undefined behavior.</p>
</blockquote>



<a name="211386162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211386162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211386162">(Sep 26 2020 at 22:50)</a>:</h4>
<p>I thought <code>longjmp</code> was always part of the charter...</p>



<a name="211386288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211386288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211386288">(Sep 26 2020 at 22:54)</a>:</h4>
<p>It's currently mentioned as "maybe in scope". The current charter has the mission statement above, followed by a bunch of bullet points that are sort of... speculative.</p>



<a name="211386296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211386296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211386296">(Sep 26 2020 at 22:54)</a>:</h4>
<p><a href="https://github.com/rust-lang/project-ffi-unwind/blob/master/charter.md">https://github.com/rust-lang/project-ffi-unwind/blob/master/charter.md</a></p>



<a name="211498106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211498106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211498106">(Sep 28 2020 at 14:17)</a>:</h4>
<p>I think that's appropriate</p>



<a name="211498134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211498134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211498134">(Sep 28 2020 at 14:17)</a>:</h4>
<p>I feel like my original understanding of the effort was a bit off; there was less "platform by platform wrangling" than I expected</p>



<a name="211498204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211498204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211498204">(Sep 28 2020 at 14:18)</a>:</h4>
<p>I am debating about the new phrasing, it's somewhat broad, but perhaps reasonable</p>



<a name="211498280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211498280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211498280">(Sep 28 2020 at 14:18)</a>:</h4>
<p>in particular I'm pondering about things like C++-to-rust exception interop, which we initially kind of ruled out of scope</p>



<a name="211498350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211498350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211498350">(Sep 28 2020 at 14:18)</a>:</h4>
<p>I'm somewhat opposed to "major additions" in this direction, at least not without considering as part of an overall prioritization, but targeted efforts (like figuring out the interaction with <code>catch_unwind</code>)</p>



<a name="211498368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211498368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211498368">(Sep 28 2020 at 14:18)</a>:</h4>
<p><em>may</em> make sense</p>



<a name="211498387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211498387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211498387">(Sep 28 2020 at 14:19)</a>:</h4>
<p>I'd like to get concrete users involved who are requesting them, though</p>



<a name="211498397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211498397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211498397">(Sep 28 2020 at 14:19)</a>:</h4>
<p>longjmp has concrete users</p>



<a name="211511874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211511874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211511874">(Sep 28 2020 at 15:58)</a>:</h4>
<p>I think my top priority remains "is it possible to write code without undefined behavior, given unusual legacy APIs?"</p>



<a name="211511908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211511908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211511908">(Sep 28 2020 at 15:59)</a>:</h4>
<p>It doesn't have to be easy or "powerful" or full-featured...just not UB.</p>



<a name="211512059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211512059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211512059">(Sep 28 2020 at 16:00)</a>:</h4>
<p>So the reason we have "extend the language" in there is that we thought it was pretty much a certainty that we'd be making cross-language unwinding opt-in.</p>



<a name="211512101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211512101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211512101">(Sep 28 2020 at 16:00)</a>:</h4>
<p>Similarly, for longjmp, we are leaning towards an explicit opt-in.</p>



<a name="211512198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211512198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211512198">(Sep 28 2020 at 16:01)</a>:</h4>
<p>Those are both technically "extending the language" even though they're pretty minimal, and the language-level change isn't really the core concern.</p>



<a name="211512510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/211512510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#211512510">(Sep 28 2020 at 16:04)</a>:</h4>
<p>I'm not sure how (or if) this intent of minimalism should be expressed in the charter, though.</p>



<a name="235721645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/210922-project-ffi-unwind/topic/Broaden%20charter%3F/near/235721645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> BatmanAoD (Kyle Strand) <a href="https://rust-lang.github.io/zulip_archive/stream/210922-project-ffi-unwind/topic/Broaden.20charter.3F.html#235721645">(Apr 22 2021 at 18:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> reviving an old topic: here's a pull request with this as our new mission statement:</p>
<blockquote>
<p>To extend the language to avoid undefined behavior when using control-flow constructs that cross between language boundaries.</p>
</blockquote>
<p><a href="https://github.com/rust-lang/project-ffi-unwind/pull/34">https://github.com/rust-lang/project-ffi-unwind/pull/34</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>